"""主文件,负责程序启动操作"""

from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
from info import create_app, db

from info import models



app = create_app("develop")

# 把app交给manager进行管理(Flask_Script)

manager = Manager(app)
# 创建数据库的迁移框架
Migrate(app, db)
# 添加数据库迁移框架的脚本
manager.add_command("mysql_script", MigrateCommand)


if __name__ == '__main__':
    # print(app.url_map)
    manager.run()
